import { GET_COMMENTS_DATA } from '../actions/actionTypes.js';

const initState = {
    commentData: {}
};

const getListData = (state, action) => {
    return {...state, commentData: action.obj.data}
}

const commentReducer = (state = initState, action) => {

    switch(action.type) {
        case GET_COMMENTS_DATA: return getListData(state, action);
        default: return state;
    }
};

export default commentReducer;
